#include "AlarmButton.h"
#include "../SGD Wrappers/SGD_Event.h"

AlarmButton::AlarmButton()
{
}


AlarmButton::~AlarmButton()
{
}

void AlarmButton::HandleCollision(const IBase* pOther)
{
	if (pOther->GetType() == OBJ_PLAYER)
	{
		SGD::Event* msg = new SGD::Event("INTERACT_WITH", (void*)nullptr, (BaseObject*)this);
		msg->QueueEvent();
		msg = nullptr;

	}
	else if (pOther->GetType() == OBJ_GUARD || pOther->GetType() == OBJ_WORKER)
	{
		SGD::Event* msg = new SGD::Event("ALARM_TRIGGER");
		msg->QueueEvent();
		msg = nullptr;

	}

}
SGD::Rectangle AlarmButton::GetRect(void)	const
{
	return SGD::Rectangle(m_ptPosition - m_szSize, m_szSize * 1.5f);

}